home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / programs / swift45i.zip / SWIFTBBS.H < prev    next >
Text File  |  1992-07-16  |  9KB  |  362 lines

  1. /*
  2.  
  3.  * swiftbbs.h
  4.  * structures and other typedefs for SwiftBBS programs.
  5.  * adapted from QuickBBS' "STRUCT.264"
  6.  
  7.  * (SwiftBBS) copyright 1989, 1990, 1991 by Dana Bell
  8.  
  9.  * revised 9/3/91
  10.  * (revisions include declaration changes to unsigned and use
  11.  * of Reserved variables for SwiftBBS features)
  12.  
  13. */
  14.  
  15. /*
  16.  * Most string variables declared in this file are actually
  17.  * null-terminated counted strings. The first [0] element is
  18.  * the length of the string. SwiftBBS attempts to preserve that
  19.  * count but uses strings as null terminated character arrays.
  20. */
  21.  
  22. #define FALSE 0
  23. #define TRUE !FALSE
  24.  
  25.  
  26. /* specify user variables as global */
  27. /************************************/
  28. typedef unsigned char flagtype[4];
  29. typedef unsigned char flagdesc[31];    /* for flags.bbs file (qflag) */
  30. typedef unsigned char gosubtype[20][9];
  31.  
  32.  
  33. /*  User Configuration Information  */
  34. /************************************/
  35. typedef struct userrecord {
  36.     unsigned char name[36];
  37.     unsigned char city[26];
  38.     unsigned char pwd[16];
  39.     unsigned char dataphone[13];
  40.     unsigned char homephone[13];
  41.     unsigned char lasttime[6];
  42.     unsigned char lastdate[9];
  43.     unsigned char attrib;
  44.     flagtype flags;
  45.     unsigned int credit;
  46.     unsigned int pending;
  47.     unsigned int timesposted;
  48.     unsigned int highmsgread;
  49.     unsigned int seclvl;
  50.     unsigned int times;
  51.     unsigned int ups;
  52.     unsigned int downs;
  53.     unsigned int upK;
  54.     unsigned int downK;
  55.     unsigned int todayK;
  56.     signed int elapsed;
  57.     unsigned int len;
  58.     unsigned int combinedptr;                    /* long in QuickBBS  */
  59.     unsigned char lastarea;             /* used by QuickBBS for age   */
  60.     unsigned char extraspace[5];
  61. } USER;
  62. /* unsigned char attributes[][12] = {
  63.         " *Deleted* ",
  64.         " Cls codes ",
  65.         " More. . . ",
  66.         " ANSI okay ",
  67.         " *No-Kill* ",
  68.         " Ignore DL ",
  69.         " Full-scrn ",
  70.         " Avatar    "                    /* Reserved in QuickBBS
  71.     };
  72. */
  73.  
  74.  
  75. /* System Configuration Information */
  76. /************************************/
  77. typedef struct boardrecord {
  78.     unsigned char name[17];
  79.     unsigned char type;     /* 0=Std   1=Net  2=Monitor  3=Echo       */
  80.                                                         /* 2=Reserved in QuickBBS  */
  81.     unsigned char kind;     /* 0=Both  1=Pvt  2=Pub      3=Read-Only  */
  82.     unsigned char combined;
  83.     unsigned char aliases;
  84.     /* flags and levels  */
  85.     unsigned int readlevel;
  86.     flagtype readflags;
  87.     unsigned int writelevel;
  88.     flagtype writeflags;
  89.     unsigned int sysoplevel;
  90.     flagtype sysopflags;
  91. } BOARD;
  92. /*    unsigned char boardtype[][12] = {
  93.             "  Standard ",
  94.             "  Net only ",
  95.             "  Monitor  ",       /* Reserved in QuickBBS
  96.             "  * Echo * ",
  97.         };
  98.         unsigned char boardkind[][12] = {
  99.             "  Pub&Priv ",
  100.             "  Private! ",
  101.             "   Public  ",
  102.             "  ReadOnly ",
  103.         };
  104. */
  105.  
  106. typedef struct eventinfo {
  107.     unsigned char status;         /* 0=Deleted 1=Enabled 2=Disabled   */
  108.     unsigned char runtime[6];
  109.     unsigned char errorlevel;
  110.     unsigned char days;
  111.     unsigned char forced;
  112.     unsigned char lasttimerun[9];
  113. } EVENT;
  114.  
  115. typedef struct configrecord {
  116.     unsigned int commport;
  117.     unsigned int initbaud, inittimes, answerwait;
  118.     unsigned char modeminitstr[71];
  119.     unsigned char modembusystr[71];
  120.     unsigned char modeminitresp[41];
  121.     unsigned char modembusyresp[41];
  122.     unsigned char resp300[41];
  123.     unsigned char resp1200[41];
  124.     unsigned char resp2400[41];
  125.     /* system paths   */
  126.     unsigned char menupath[67];
  127.     unsigned char textpath[67];
  128.     unsigned char netpath[67];
  129.           /* restriction parameters  */
  130.     unsigned int minbaud;
  131.     unsigned int graphicsbaud;
  132.     unsigned int xferbaud;
  133.     unsigned char lowbaudstart[6];
  134.     unsigned char lowbaudend[6];
  135.     unsigned char downloadstart[6];
  136.     unsigned char downloadend[6];
  137.     unsigned char pagingstart[6];
  138.     unsigned char pagingend[6];
  139.     /* matrix information   */
  140.     unsigned int matrixzone;
  141.     unsigned int matrixnet;
  142.     unsigned int matrixnode;
  143.     unsigned int akanet[5];
  144.     unsigned int akanode[5];
  145.     unsigned int netmailboard;
  146.     /* default information for new users   */
  147.     unsigned int defaultsec;
  148.     unsigned int defaultcredit;
  149.     flagtype defaultflags;
  150.     /* sysop security levels   */
  151.     unsigned char editorcmdstr[71];
  152.     unsigned char originline[61];
  153.     unsigned char sysopname[36];
  154.     unsigned char
  155.         autologonchar,
  156.         fastlogon,
  157.         screenblanking,
  158.         uselastread,
  159.         monomode,
  160.         directwrite,
  161.         snowcheck,
  162.         netechoexit,
  163.         onewordnames,
  164.         checkmail,
  165.         askhomephone,
  166.         askdataphone,
  167.         graphicsavail;
  168.     unsigned int
  169.         inactivetimeout,
  170.         logontime,
  171.         deffgcolor,
  172.         defbgcolor,
  173.         passwordtries,
  174.         maxpagetimes,
  175.         pagebelllen;
  176.     unsigned char
  177.         use_xmodem,
  178.         use_xmodem1k,
  179.         use_ymodem,
  180.         use_ymodemg,
  181.         use_sealink,
  182.         use_zmodem,
  183.         inp_fields;
  184.     unsigned char quotestr[4];
  185.     unsigned int uploadcredit;
  186.     unsigned char loadingmessage[71];
  187.     unsigned char selectionprompt[71];
  188.     unsigned char versionid[2];
  189.           /* added for 2.04 */
  190.     unsigned char resp4800[41];
  191.     unsigned char resp9600[41];
  192.     unsigned int akazone[5];
  193.     /* added for 2.60 */
  194.     unsigned int matrixpoint;
  195.     unsigned int akapoint[5];
  196.     unsigned char useaka[200];
  197.     unsigned char askage;
  198.     unsigned char systemname[41];
  199.     long regkey;
  200.     char extraspace[5];
  201.     EVENT eventrec[30];
  202.     BOARD boardrec[200];
  203. } CONFIG;
  204.  
  205. typedef struct sysinfo {
  206.     long callcount;
  207.     unsigned char lastcaller[36];
  208.     unsigned char extrasys[128];
  209. } SYS;
  210.  
  211. typedef struct timeinfo {
  212.     unsigned char startdate[9];
  213.     unsigned int busyperhour[24];
  214.     unsigned int busyperday[7];
  215. } TIMELOG;
  216.  
  217. typedef struct exitinfo {
  218.     unsigned int baudrate;
  219.     SYS sysinfo;
  220.     TIMELOG timeloginfo;
  221.     USER userinfo;
  222.     EVENT eventinfo;
  223.     unsigned char netmail;
  224.     unsigned char echomail;
  225.     unsigned char logintime[6];
  226.     unsigned char logindate[9];
  227.     unsigned int tmlimit;
  228.     unsigned int loginsec;                        /* long in QuickBBS */
  229.     unsigned int credit;                          /* long in QuickBBS */
  230.     unsigned int userrecnum;
  231.     unsigned int readthru;
  232.     unsigned int pagetimes;
  233.     unsigned int downlimit;
  234.     unsigned char wantchat;
  235.     unsigned char gosublevel;
  236.     gosubtype gosub;
  237.     unsigned char menu[9];
  238. } EXIT;
  239.  
  240.  
  241. /*  Nodelist Configuration Information  */
  242. /****************************************/
  243. typedef struct noderecord {
  244.     unsigned char nodetype;
  245.     unsigned int zone,net,node;
  246.     unsigned char name[21];
  247.     unsigned char city[41];
  248.     unsigned char phone[41];
  249.     unsigned char password[9];
  250.     unsigned int flags;
  251.     unsigned int baudrate;
  252.     unsigned int cost;
  253. } NODE;
  254.  
  255. typedef struct nodeindex {
  256.     unsigned int zone,net,node;
  257.     unsigned char nodetype;
  258. } NIDX;
  259. /* unsigned char nodeattrib[][12] = {
  260.         "  Net Hub  ",
  261.         "  Net Host ",
  262.         " Reg Coord ",
  263.         " Zone gate ",
  264.         "  Runs CM  ",
  265.         "           ",
  266.         "           ",
  267.         "           "
  268.     };
  269. */
  270.  
  271.  
  272. /*  Menu Configuration Information  */
  273. /************************************/
  274. typedef struct menuinfo {
  275.     unsigned char type;
  276.     unsigned int security;
  277.     flagtype flags;
  278.     unsigned char display[76];
  279.     unsigned char key;
  280.     unsigned char data[81];
  281.     unsigned char fg, bg;
  282. } MENU;
  283.  
  284.  
  285. /*   Message Files Structures   */
  286. /********************************/
  287. typedef struct msginfo {
  288.     unsigned int lowmsg;
  289.     unsigned int highmsg;
  290.     unsigned int totalactive;
  291.     unsigned int activemsgs[200];
  292. } MSGINFO;
  293.  
  294. typedef struct msgidx {
  295.     unsigned int msgnum;
  296.     unsigned char board;
  297. } MSGIDX;
  298.  
  299. typedef struct msghdr {
  300.     unsigned int
  301.         msgnum,
  302.         replyto,
  303.         seealsonum,
  304.         tread;
  305.     unsigned int startrec;
  306.     unsigned int
  307.         numrecs,
  308.         destnet,
  309.         destnode,
  310.         orignet,
  311.         orignode;
  312.     unsigned char
  313.         destzone,
  314.         origzone;
  315.     unsigned int cost;
  316.     unsigned char
  317.         msgattr,
  318.         netattr;
  319.     unsigned char board;
  320.     unsigned char posttime[6];
  321.     unsigned char postdate[9];
  322.     unsigned char whoto[36];
  323.     unsigned char whofrom[36];
  324.     unsigned char subj[73];
  325. } MSGHDR;
  326.  
  327. /*       unsigned int destpoint;*/
  328.  
  329. /* unsigned char msgattrib[][12] = {
  330.         " *Deleted* ",
  331.         " unmovdNet ",
  332.         " *Net Msg* ",
  333.         " *Private* ",
  334.         " *Received ",
  335.         " unmovdEch ",
  336.         " * Local * ",
  337.         " *Monitor* "                    /* Reserved in QuickBBS
  338.     };
  339.     unsigned char netattrib[][12] = {
  340.         " * KILL  * ",
  341.         "  Sent Ok  ",
  342.         "  Attaches ",
  343.         " * CRASH * ",
  344.         " Recpt Req ",
  345.         " Audit Req ",
  346.         " IsRetRcpt ",
  347.         "  File Req "                    /* Reserved in QuickBBS
  348.     };
  349. */
  350.  
  351.  
  352. /* Standard Errorlevels */
  353. /************************/
  354. /*
  355.     255 compiler
  356.     6+ external program
  357.     5 Net & echo processing done/needed
  358.     2 Fatal error - problem
  359.     1 Problem accessing a file
  360.     0 did nothing, do nothing, default
  361. */
  362.